package com.yzk.train.member.controller.admin;

import com.yzk.train.common.response.Result;
import com.yzk.train.member.response.StationFlowResp;
import com.yzk.train.member.service.FlowService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/admin/flow")
public class FlowController {

    @Resource
    private FlowService flowService;

    @GetMapping("/total")
    public Result<List<StationFlowResp>> queryTotalFlow() {
        List<StationFlowResp> list = flowService.queryTotalFlow();
        return Result.ok(list);
    }

    @GetMapping("/today")
    public Result<List<StationFlowResp>> queryTodayFlow() {
        List<StationFlowResp> list = flowService.queryTodayFlow();
        return Result.ok(list);
    }

}
